#ifndef __TOUCHSCREEN_H  
#define __TOUCHSCREEN_H

public static int pointerPosX = -1;
public static int pointerPosY = -1;
public static boolean isRelease = false;
public static boolean isPressing = false;

protected void pointerPressed(int x, int y)
{
	pointerPosX = x;
	pointerPosY = y;
	isPressing = true;
	isRelease = false;
}

protected void pointerDragged(int x, int y)
{
	pointerPressed(x, y);
}

protected void pointerReleased(int x, int y)
{
	isRelease = true;
	isPressing = false;
}

public static void updatePointerEvents()
{
}

public static boolean pointerInBox(int x, int y, int w, int h)
{
	return (((pointerPosX >= x) && (pointerPosX <= x + w)) && ((pointerPosY >= y) && (pointerPosY <= y +h)));
}

public static void ClearPointer()
{
	pointerPosX = -1;
	pointerPosY = -1;
	isRelease = false;
	isPressing = false;
}
#endif // __TOUCHSCREEN_H
